<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网易新闻列表</title>
    <link rel="stylesheet" href="./css/reset.css">
    <style>
        body{
            background-color: #bfa;
        }

        a{
            /* 去下划线 */
            text-decoration: none;
        }

        .news-wrapper{
            width: 300px;
            height: 358px;
            background-color: #fff;
            margin: 50px auto;
            border-top: 1px solid #ddd;
        }

        .news-title{
            /* 为了边框和文字宽度一致，需要将h2转换为行内块元素 */
            display: inline-block;
            height: 40px;
            border-top: 1px solid red;
            margin-top: -1px;
            line-height: 40px;
        }
        
        .news-title a{
            
            color: #404068;
            font-weight: bold;
            /* a是行内元素，所以margin-top没效果 */
            /* margin-top: 10px; */
        }

        .news-img{
            height: 150px;
        }

        .news-img .img-title{
            margin-top: -30px;
            color: #fff;
            font-weight: bold;
            padding-left: 30px;
        }

        /* 设置新闻列表 */
        .news-list{
            margin-top: 20px;
            padding-left: 8px;
        }
        
        .news-list li::before{
            content: '■';
            color: rgb(218, 218, 218);
            font-size: 12px;
            margin-right: 6px;
        }

        .news-list li{
            margin-bottom: 17px;
        }

        .news-list li a{      
            font-size: 14px;
            color: #666;
        }

        .news-list li a:hover{
            color: red;
        }
    </style>
</head>

<body>
    <div class="news-wrapper">
        <h2 class="news-title">
            <a href="#">体育</a>
        </h2>

        <div class="news-img">
            <a href="">
                <img src="./img/qiuyuan.jpg" alt="">
                <h3 class="img-title">
                    费德勒首负迪米 扶额摇头不满发挥
                </h3>
            </a>
        </div>

        <!-- 新闻列表 -->
        <ul class="news-list">
            <li><a href="#">乔治：我爱LA 喜欢和LBJ一起打球</a></li>
            <li><a href="#">格林：3年前降薪就在等KD 特制T恤嘲讽LBJ</a></li>
            <li><a href="#">塔克4000双鞋让保罗羡慕嫉妒 乔丹被震惊</a></li>
            <li><a href="#">CBA下季新赛制：常规赛4组循环 增至46轮</a></li>
        </ul>
    </div>
</body>

</html>